import { stringify } from 'qs';
import { request,  }  from '../utils/request';
import { getConfig } from '../../config';
const config = getConfig();


// 获取版本列表
export async function queryAllAppVersion(params) {
  return request('/sys/appversion/list', {
    method: 'POST',
    body: params,
  });
}

// 版本详情
export async function getAppVersionInfo(params) {
  if (config.isMock) {
    return request(`/sys/appversion/info`, {
      method: 'POST',
      body: params,
    });
  }else{
    return request(`/sys/appversion/info/${params.id}`, {
      method: 'POST',
    });
  }
}

// 版本新增
export async function saveAppVersionAdd(params) {
  return request('/sys/appversion/save', {
    method: 'POST',
    body: params,
  });
}

// 版本修改
export async function saveAppVersionEdit(params) {
  return request('/sys/appversion/update', {
    method: 'POST',
    body: params,
  });
}


// 版本删除
export async function saveAppVersionDel(params) {
  return request('/sys/appversion/delete', {
    method: 'POST',
    body: params,
  });
}
